home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 228 < prev    next >
Text File  |  1996-08-06  |  4KB  |  69 lines

  1. Newsgroups: comp.lang.c,comp.std.c
  2. Path: phcoms4.seri.philips.nl!panther!baynes
  3. From: baynes@ukpsshp1.serigate.philips.nl (Stephen Baynes)
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Sender: news@ukpsshp1.serigate.philips.nl (account for localnews)
  6. Message-ID: <DLzK76.88@ukpsshp1.serigate.philips.nl>
  7. Date: Tue, 30 Jan 1996 08:42:42 GMT
  8. References: <30C40F77.53B5@swsbbs.com> <DLtABq.Fzu@mv.mv.com> <4edqh2$rvl@solutions.solon.com> <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de> <4eindq$eju@solutions.solon.com>
  9. Organization: Philips Semiconductors, Southampton, UK
  10. X-Newsreader: TIN [version 1.2 PL2]
  11. Followup-To: comp.lang.c,comp.std.c
  12.  
  13. Peter Seebach (seebs@solutions.solon.com) wrote:
  14. : In article <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de>,
  15. : James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
  16. : >In article <4edqh2$rvl@solutions.solon.com> seebs@solutions.solon.com
  17. : >(Peter Seebach) writes:
  18. : >In the particular case which you cite, I do *not* believe that gcc
  19. : >will compile the program without a diagnostic if the program is in a
  20. : >file called a.c.  More ever, the compiler documentation definitly
  21. : >states that only programs in files whose names end in .c will be
  22. : >compiled as C.  (A legal restriction, as far as I can see.)
  23.  
  24. : That's an interesting question; the standard does not visibly make any
  25. : such requirements, but you could argue that gcc is only a conforming compiler
  26. : when invoked on a file ending in .c.
  27.  
  28. : Yes, it would *have* to give a diagnostic for a Fortran program; nonetheless,
  29. : the program is *still* conforming if it is accepted.  I think this is a
  30. : botch; the standard should probably distinguish between extensions and
  31. : violations.
  32.  
  33. I think you need to distinguish between extensions (which a conformant compiler
  34. must give a diagnostic) and parts of the magic incantations needed to run the
  35. compiler (in ansi mode). Nameing a file to end '.c' is an incantation 
  36. along with -strict or -Aa. If you get it wrong you it is up to the implementor. 
  37. However if having perfomed the correct incantation - if the compiler fails
  38. to give a diagnostic required by the standard then that is a bug in the
  39. compiler - even if it then goes on to generate useful code. The whole point
  40. about a standard compiler is that if code compiles clean on one, it should
  41. compile clean on all.
  42.  
  43.  
  44.  
  45. : >Yes and no.  In comp.std.c, the discussion is exactly about what is
  46. : >legal according to the standard.  In comp.lang.c (to which this
  47. : >article is also cross-posted), the discussion should generally be a
  48. : >bit more open.
  49.  
  50. : It's debated.  Generally, questions about features of specific compilers or
  51. : OS's are off-topic, even when they relate to conforming programs.  Only
  52. : strictly conforming programs (or attempts at such, when people are asking
  53. : questions) are going to be usable and testable by the whole readership.
  54. : (I doubt you can find a single extension that works on *all* machines
  55. : we use.)
  56.  
  57. I would regard it as reasonable in comp.std.c to also to permit occasional
  58. discussion on other well defined and reasonably well known standards in 
  59. their impact on how one can use the C language. The only standards I can think
  60. of at the moment are POSIX/XOPEN, IEEE floating point and the one that came
  61. up last year to do with arithmetic (the name of which I have forgotton).
  62.  
  63.  
  64. --
  65. Stephen Baynes                              baynes@mulsoc2.serigate.philips.nl
  66. Philips Semiconductors Ltd
  67. Southampton                                 My views are my own.
  68. United Kingdom
  69.